<?php
require_once('configure.php'); 
list($nik,$nama) = explode("/" ,$_GET['q'] );
$query = "
	SELECT b.nama,a.nik,a.karyawan_id FROM  karyawan a
	INNER JOIN biodata b ON a.biodata_id = b.biodata_id
	WHERE  a.nik LIKE '{$_GET['q']}%'  AND a.karyawan_id NOT IN ( select karyawan_id FROM karyawan_disable )
";
 
$res = my_query($query);
 
while( $rw=my_fetch_array($res) ){
echo strtoupper($rw['nik']."/".$rw['nama'])."\n";
}
exit;
$query2 = "SELECT a.nama , b.label_jenis_non_karyawan  FROM spd_non_karyawan a
INNER JOIN spd_jenis_non_karyawan b 
ON b.jenis_non_karyawan_id = a.jenis_non_karyawan_id
WHERE a.nama LIKE '%{$_GET['q']}%' ";
$res2 = my_query($query2);
 
while( $rw2=my_fetch_array($res2) ){
	echo strtoupper( $rw2['nama'] .'|'.$rw2['label_jenis_non_karyawan'] )."\n";
}
exit;
?>